home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / newsgrp / group96b.txt / 000017_icon-group-sender _Sat Oct 12 12:10:04 1996.msg < prev    next >
Internet Message Format  |  1997-01-02  |  2KB

  1. Received: by cheltenham.cs.arizona.edu; Mon, 14 Oct 1996 09:47:22 MST
  2. Message-Id: <v01510102ae858aa4ae6c@[204.73.77.122]>
  3. Mime-Version: 1.0
  4. Content-Type: text/plain; charset="us-ascii"
  5. Date: Sat, 12 Oct 1996 12:10:04 -0600
  6. To: icon-group@cs.arizona.edu
  7. From: carl@bitstream.net (Carl Sturtivant)
  8. Subject: Re: Parsing the Icon command line
  9. Errors-To: icon-group-errors@cs.arizona.edu
  10.  
  11. >
  12. >Agreed, now that you point it out.  I therefore repeated the test
  13. >as you suggested and got the same results as shown below.  This test
  14. >was done on a different computer that is strictly DOS, no OS/2.
  15. >
  16. >h:\>command
  17. >
  18. >Microsoft(R) MS-DOS(R) Version 6.20
  19. >             (C)Copyright Microsoft Corp 1981-1993.
  20. >
  21. >H:\>v:\cmdline.exe "A   B"   \"C   D\"
  22. >A
  23. >B
  24. >C D
  25. >
  26. >This should not be surprising since 4DOS is supposed to be compatible
  27. >with and a superset of MS-DOS.  For reference purposes, the only
  28. >operative statement of the ICON program, cmdline, is as follows:
  29. >                  every write(&output,C[1 to *C])
  30. >where C is the list of command line arguments.  The concern among
  31. >others is the reduction of the three blanks between C and D to one.
  32. >
  33. >                                  Larry Bezeau@UNB.Ca
  34.  
  35. I ran the following program on a DOS 6.20 machine, using a DOS/386
  36. implementation of icon 9.1, with very different results.
  37.  
  38. -------------------------------
  39. C:\>type arg.icn
  40. #program arg.icn
  41. procedure main(arg)
  42.     every write(!arg)
  43. end
  44.  
  45. C:\>arg "A   B" \"C   D\"
  46. A   B
  47. \"C
  48. D\"
  49.  
  50. C:\>
  51. -------------------------------
  52.  
  53. This behaviour was repeated under the ndos shell, and when the main program
  54. line was replaced by "every write(arg[1 to *arg])". It would be nice if the
  55. backslashes had disappeared, but aside from this it seems OK.
  56.  
  57. So may I suggest that the command line behaviour that you are getting is a
  58. property not of icon, but of the compiler that built the particular
  59. implementation that you are using. The command line parameters received by
  60. the icon runtime system are doubtless passed in to the main C procedure in
  61. whatever form the startup code for the compiler sees fit.
  62.  
  63. Carl Sturtivant
  64. carl@bitstream.net
  65.  
  66.  
  67.